/**
 * 计算 公元1000-9999年之间有多少年是闰年
 */

#include <stdio.h>
int main() {
	int i = 0, count = 0;
	for (i = 1000; i <= 9999; i ++) {
		if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0) {
			count ++;
		}
	}

	printf("There are %d leap years", count);
}

/**
 * 输出: There are 2182 leap years
 */